<?php
$login = array(
	'name'	=> 'login',
	'id'	=> 'login',
	'value' => set_value('login'),
	'maxlength'	=> 80,
	'size'	=> 30,
);
if ($login_by_username AND $login_by_email) {
	$login_label = 'Email eller brugernavn';
} else if ($login_by_username) {
	$login_label = 'Login';
} else {
	$login_label = 'Email';
}
$password = array(
	'name'	=> 'password',
	'id'	=> 'password',
	'size'	=> 30,
);
$remember = array(
	'name'	=> 'remember',
	'id'	=> 'remember',
	'value'	=> 1,
	'checked'	=> set_value('remember'),
	'style' => 'margin:0;padding:0',
);
$captcha = array(
	'name'	=> 'captcha',
	'id'	=> 'captcha',
	'maxlength'	=> 8,
);
?>
<?php echo form_open($this->uri->uri_string(), array('class'=>'form-horizontal')); ?>
<legend>Log ind</legend>
	<div class="control-group">
		<?php echo form_label($login_label, $login['id'], array("class"=> "control-label")); ?>
		<div class="controls">
			<?php echo form_input($login); ?>
		</div>
	</div>
		<?php echo form_error($login['name']); ?><?php echo isset($errors[$login['name']])?$errors[$login['name']]:''; ?>
	
	<div class="control-group">
		<?php echo form_label('Password', $password['id'], array('class'=>'control-label'));?>
		<div class="controls">
			<?php echo form_password($password); ?>
		</div>
	</div>
		<?php echo form_error($password['name']); ?><?php echo isset($errors[$password['name']])?$errors[$password['name']]:''; ?>
	

	<?php if ($show_captcha) {
		if ($use_recaptcha) { ?>
	
			<div id="recaptcha_image"></div>
		
		
			<a href="javascript:Recaptcha.reload()">Få en ny CAPTCHA</a>
			<div class="recaptcha_only_if_image"><a href="javascript:Recaptcha.switch_type('audio')">Få en lydbaseret CAPTCHA</a></div>
			<div class="recaptcha_only_if_audio"><a href="javascript:Recaptcha.switch_type('image')">Få en billede-CAPTCHA</a></div>
		
	
		
			<div class="recaptcha_only_if_image">Enter the words above</div>
			<div class="recaptcha_only_if_audio">Enter the numbers you hear</div>
		
		<input type="text" id="recaptcha_response_field" name="recaptcha_response_field" />
		<td style="color: red;"><?php echo form_error('recaptcha_response_field'); ?>
		<?php echo $recaptcha_html; ?>
	
	<?php } else { ?>
	
			<p>Skriv koden som den er - nøjagtigt:</p>
			<?php echo $captcha_html; ?>
		
	
	
		<?php echo form_label('Bekræftelseskode', $captcha['id']); ?>
		<?php echo form_input($captcha); ?>
		<?php echo form_error($captcha['name']); ?>
	
	<?php }
	} ?>

	
		<div class="control-group">
			<div class="controls">
				<?php echo form_checkbox($remember); ?>
				<?php echo form_label('Husk mig på denne computer', $remember['id']); ?>
			</div>
		</div>
			<?php echo anchor('/auth/forgot_password/', 'Glemt password'); ?>
			<?php if ($this->config->item('allow_registration', 'tank_auth')) echo anchor('/auth/register/', 'Opret konto'); ?>
		

<?php echo form_submit('submit', 'Log in'); ?>
<?php echo form_close(); ?>